1. Technical Field
The present disclosure relates to servers and, more specifically, to modular serve architecture.
2. Description of the Related Art
Extensible Markup Language (XML) is a computer language for structured documents. Structured documents are documents that may contain content as well as descriptions and/or classifications of the content. For example, a structured document may be a book that includes a novel (the content) as well as a description of the novel (the title).
XML is a human-readable computer language. A human-readable computer language is a computer language where the source code may be viewed as standard text and a human reader may be able to interpret the significance of the source code by examining the text. As a human-readable computer language, XML may be interpreted by a wide variety of computer platforms. This feature makes XML an excellent standard for data that is communicated between diverse programs, operating systems and computers.
XML documents may be made up of elements. Each element may be assigned any number of attributes. Attributes may have values.
XML content may be described by using tags. Tags are descriptive captions that appear before and after content and may include attributes and values. Unlike some other computer languages where tags are predefined, such as hypertext markup language (HTML), XML tags may be user defined. XML can therefore use any number of tags to describe any form of content.
Each element in an XML document may be delineated by a start-tag that is presented immediately before the element and an end-tag that is presented immediately after the element.
XML documents may be hierarchical. Hierarchical XML documents may contain a sequence of parent and child elements where one or more elements may be child elements of a patent element. An element is a child element if its tags are situated between the start-tag and end-tag of another element. An element is a patent element if the tags of another element are situated between the parent element's start-tag and end-tag. An element may be both a parent element and a child element as XML documents may have any number of hierarchical generations. The hierarchy of an XML document may be represented as a tree where the highest element of the hierarchy is considered to be the root and inferior generations branch downwards from the root.
An XML document may have an accompanying XML schema. The schema may define one or more object classes that objects within the XML document may conform to. The attributes that may be associated with an object class may be specified within the schema. The schema may establish the hierarchy between objects and define the attributes that may appear in the XML document.
Web services present a new way for computer to communicate with each other. Web services are software systems that can be identified by Universal Resource Identifiers (URI), analogous to identification of websites by Uniform Resource Locator (URL). Web services generally perform specialized functions or provide access to information. Web services generally contain public interfaces and bindings that enable other software systems (such as other web services) to seamlessly utilize its functionality. In this way, web services are transforming the way modern enterprises interact and share information.
Web services commonly communicate by exchanging data in the form of XML documents to facilitate communication of information across various platforms. Therefore as the popularity of web services increases, so does the desire to store and retrieve large numbers of XML documents.
While computer applications such as web services may utilize XML as the preferred language for communicating information, other computer languages may be better suited for the manipulation and processing of information. It is therefore desirable to be able to convert XML documents into other formats.
For example, it may be desirable to convert XML documents into Java programs. Java is a popular object-oriented, platform-independent programming language developed by Sun® Microsystems. A Java program may include software data structures called Java classes that serve to define objects within Java programs. The way in which Java classes define Java objects is analogous to the way in which XML schemas define XML objects as described above.
When converting XML documents to a more convenient format, for example Java, it may be necessary to convert XML schemas to software data structures, for example Java classes. This conversion maybe made manually. Manual conversion of an XML schema to a Java class may include a programmer examining the XML schema object-by-object and manually coding corresponding Java classes. This manual conversion may be labor intensive, often involving hundreds, if not thousands of small, often similar data structures. Additionally, manual conversion may be prone to human error.
If after a manual conversion, the XML schema changes, it may be necessary to manually change the corresponding Java classes. This process may suffer from the same disadvantages as the original conversion process discussed above.
Rather than manually converting XML schemas to Java classes, tools have been developed for automatic conversion. One example of such a tool is Java Architecture for XML Binding (JAXB). JAXB may be used to parse an XML schema generate a set of Java classes that correspond to the object classes of the XML schema being converted.
However, automatic conversion tools such as JAXB may not be able to convert application-specific functionality and may only create static repositories for the XML data. For example, while such automatic conversion may result in a complete Java program, this resulting program might only be useful as a container for storing information and may not have functionality that may be executed. In a normal object-oriented system such as the Java programming language, the limited nature static classes may be overcome by adding additional Java classes that provide functionality. However due to the limited nature of the automatic generation of Java classes, it may not be possible to have additional Java classes automatically added to an existing set of Java classes to extend the functionality of the existing Java classes. Programmers using tools such as JAXB might have to manually write the new extension functionality directly to the automatically generated classes Lo add functionality to the automatically generated Java classes. These manual additions may have to be programmed every time the classes are regenerated. Each time these manual extension functions are written, opportunity for human error is introduced.
It is therefore desirable to convert XML schema to software data structures for example Java classes, without the need for manually adding or modifying the software data structures after they have been generated.
As described above, XML is a popular language for the communication of information between web services and web service users. However, while XML may be a natural choice for the communication of data; it may be very difficult for web services to interpret the great amount of XML data that web services tend to receive from web service users such as other web services.
One traditional approach for the processing of XML data is to utilize large programs on the web service server that examine every element of the XML document according to its hierarchy tree as it makes determination on how to process each element. This approach is prone to error as data that is either not expected or improperly formatted may cause unpredictable and/or difficult to overcome. It is therefore important that data be screened to ensure that data is valid and free from errors, processes known as error checking and validation. This in turn may result in a large body of server code dedicated to error checking and validation. There may also be a substantial risk of failure in this approach.
Programs for validating XML data often belong to one of two types. The “two pass” type validation programs first check to make sure the data is valid and then allows the data to be processed. The “on the fly” type validation programs check the validity of the data as it is processed.
Regardless of the type of validation process used, validation programs generally check to see if the data is properly formatted and of a type that is expected by an application that may make use of the data, for example a web service. If the data is properly formatted and expected, the data may be accepted. If the data is not properly formatted and/or unexpected; the data may be rejected.
Validation often requires that a large number of tests be manually written and used to validate data. Because these programs are often custom written for the data being checked, programming errors are not uncommon. Important tests may be forgotten incorrectly implemented, or rendered obsolete as the XML schema changes. Where such validation problems occur, it is possible that invalid data may be wrongfully accepted. Where invalid data is accepted and sent to an application, for example a web service, consequences may occur. These consequences may range from minor annoyance (for example an inappropriate error message being returned to the user), to disastrous (for example the server may fail completely), to catastrophic (for example a security breach may occur).
Because of the seriousness of this problem, a great deal of time and resources may be spent developing specific validation programs for XML data. Additionally, where the appropriate time and resources are not spent on developing validation programs, the quality of the end product might suffer.
It is therefore desirable to utilize more efficient and effective validation techniques.
In an attempt to break up the complex operation of processing XML data into object oriented modules, programmers may manually structure server code to include a great number of objects for processing particular portions of XML data. Because of the large number of required objects and the possibility of manual error resulting from the manual programming, server code for processing XML documents can potentially be large, messy and/or unstable.
It is therefore desirable to utilize a server that can process XML documents in a clean, modular and object oriented fashion.